package com.algernoon.rpc.springrpc.rmi.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.rmi.RmiProxyFactoryBean;

@Configuration
public class SpringRmiClientConfig {

	@Bean(name = "rmiService")
	public RmiProxyFactoryBean initRmiProxyFactoryBean() {
		RmiProxyFactoryBean factoryBean = new RmiProxyFactoryBean();
		factoryBean.setServiceUrl("rmi://localhost:1199/SpringUserService");
		factoryBean.setServiceInterface(ISpringUserService.class);
		return factoryBean;
	}

}
